package com.feng.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * (Article)表实体类
 *
 * @author feng
 * @since 2024-10-18 13:51:20
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Article{
    //文章ID
    private String id;
    //文章标题
    private String title;
    //文章内容
    private String content;
    //文章摘要
    private String summary;
    //所属分类ID
    private Long categoryId;

    @TableField(exist = false)
    private String categoryName;
    //缩略图
    private String thumbnail;
    //是否置顶(0否 1是)
    private Integer isTop;
    //发布状态(0发布 1草稿)
    private Integer status;
    //访问量
    private Long viewCount;
    //是否允许评论(0否 1是)
    private Integer isComment;
    //创建人
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    //创建时间
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    //更新人
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;
    //更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    //逻辑删除
    private Integer delFlag;

    public Article (String id,String title, String content, String summary, Long categoryId, String thumbnail, Integer isTop, Integer status,Integer isComment) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.summary = summary;
        this.categoryId = categoryId;
        this.thumbnail = thumbnail;
        this.isTop = isTop;
        this.status = status;
        this.isComment = isComment;
    }
}

